/**
 * 
 */
package cn.dgfy.MyBatisStudy.bean;

/**
 * @author Tearfalls
 *
 */
public class Major {
	private Integer id = 0;
	private String code = "";
	private String name = "";
	
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		if (id == null) {
			this.id = 0;
		} else {
			this.id = id;
		}
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		if (code == null) {
			this.code = "";
		} else {
			this.code = code;
		}
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		if (name == null) {
			this.name = "";
		} else {
			this.name = name;
		}
	}
	
	/**
	 * 无参数构造方法
	 */
	public Major() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * 全参数构造方法
	 * 
	 * @param id
	 *            专业的id
	 * @param code
	 *            专业代码
	 * @param name
	 *            专业名称
	 */
	public Major(Integer id, String code, String name) {
		super();
		this.setId(id);
		this.setCode(code);
		this.setName(name);
	}
	
	@Override
	public String toString() {
		return "Major [ id = " + id + ", code = " + code + ", name = " + name + " ]";
	}
}